package com.apexedu.biz.action;

import com.apexedu.framework.service.BaseService;
import com.apexedu.identity.entity.TSysUser;
import com.apexedu.sys.action.AbstractBaseActionSupport;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 使用注解的action示例
 * @Component 注解生成的bean id默认就是类名，首字母小写。
 * 符合ssh_dev开发规范。所以一般直接简写@Component注解即可。
 * 另外注意要调用super.setBaseService(baseService);
 * 上面用注解@Resource(name="atestService")告诉本action的service是用哪一个类！！
 * 用哪个service也可以自己写属性，然后用@Autowired属性植入，不过推荐用上一个方式植入action里。
 * @author Yangjianliang
 * datetime 2012-6-13
 */
@SuppressWarnings("serial")
@Component
@Scope("prototype")
public class AnnotationExampleAction extends AbstractBaseActionSupport {

//	private static final Log LOG = LogFactory.getLog(AtestAction.class);

	/**
	 * 此方法植入service类
	 */
	@Resource(name="annotationExampleService")
	public void setBaseService(BaseService baseService){
		super.setBaseService(baseService);
	}
	
	private TSysUser tsysUser;

	public TSysUser getTsysUser() {
		return tsysUser;
	}

	public void setTsysUser(TSysUser tsysUser) {
		this.tsysUser = tsysUser;
	}
}
